class AddWorkOrderFields < ActiveRecord::Migration
  def self.up
	add_column :events, :work_order_date, :datetime
	add_column :events, :workordertype_id, :integer
	add_column :events, :due_date, :datetime
	add_column :events, :priority, :integer
	add_column :events, :customer_name, :text
	add_column :events, :customer_address, :text
	add_column :events, :contact_person, :text
	add_column :events, :contact_tel, :text
	add_column :events, :contact_email, :text
	add_column :events, :standard_time, :float
	add_column :events, :sales_order_number, :text
	add_column :events, :ref_num, :text
	add_column :events, :status, :integer
	add_column :events, :progress, :integer
	add_column :events, :progress_stamp, :datetime
  end

  def self.down
	remove_column :events, :work_order_date
	remove_column :events, :workordertype_id
	remove_column :events, :standard_time
	remove_column :events, :due_date
	remove_column :events, :priority
	remove_column :events, :customer_name
	remove_column :events, :customer_address
	remove_column :events, :contact_person
	remove_column :events, :contact_tel
	remove_column :events, :contact_email
	remove_column :events, :sales_order_number
	remove_column :events, :ref_num
	remove_column :events, :status
	remove_column :events, :progress
	remove_column :events, :progress_stamp
  end
end
